import Vue from 'vue';
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routers = [
    {
        path: "/login",
        component: () => import("@/components/Login"),
        name: "login",
        meta: {title: "登陆"}
    },
    {
        path: "/home",
        component: () => import("@/components/HomePage"),
        name: "home",
        meta: {title: "首页"},
        children: [{
            path: "/home",
            component: () => import("@/components/views/HeadPage"),
            name: "head",
            meta: {title: "首页数据"}
        }, {
            path: "/record",
            component: () => import("@/components/CheckoutPage"),
            name: "record",
            meta: {title: "人员打卡记录"}
        }, {
            path: "/touchManagement",
            component: () => import("@/components/TouchManagementPage"),
            name: "touchManagement",
            meta: {title: "密接人员管理"}
        }, {
            path: "/patientManagement",
            component: () => import("@/components/PatientManagementPage"),
            name: "patientManagement",
            meta: {title: "确诊人员管理"}
        }, {
            path: "/deathManagement",
            component: () => import("@/components/DeathManagementPage"),
            name: "deathManagement",
            meta: {title: "死亡管理"}
        }, {
            path: "/cureManagement",
            component: () => import("@/components/CureManagementPage"),
            name: "cureManagement",
            meta: {title: "治愈管理"}
        }, {
            path: "/userManagement",
            component: () => import("@/components/UserManagementPage"),
            name: "userManagement",
            meta: {title: "用户管理"}
        }, {
            path: "/dataView",
            component: () => import("@/components/DataViewPage"),
            name: "dataView",
            meta: {title: "疫情数据"}
        }, {
            path: "/notificationManagement",
            component: () => import("@/components/NotificationManagementPage"),
            name: "notificationManagement",
            meta: {title: "通知管理"}
        }, {
            path: "/reportManagement",
            component: () => import("@/components/ReportManagementPage"),
            name: "reportManagement",
            meta: {title: "报备管理"}
        }]
    }];

const router = new VueRouter({
    routes: routers
});

export default router
